package PTA1.ti201;

import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

/**
 * @author Lenovo
 */
public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNext()){
            String line= scanner.nextLine();
            if(line.isEmpty()){
                continue;
            }
            int num=0;
            try{
                num=Integer.parseInt(line);
            }catch (NumberFormatException e){
                continue;
            }
            if (num >= 10000 && num <= 20000) {
                String binary = Integer.toBinaryString(num);
                String octal = Integer.toOctalString(num);
                String hex = Integer.toHexString(num);
                System.out.println(binary + "," + octal + "," + hex);
            } else{
             List<Integer> digits=new ArrayList<>();
             int sum=0;
             for (int i=0;i<line.length();i++){


              }
            }
        }
    }
}
